<!--
 * @Author: [yuantongxin]
 * @Date: 2021-09-17 14:19:38
 * @LastEditors: [yuantongxin]
 * @LastEditTime: 2021-09-23 19:42:34
 * @Description: 封装底部组件
-->
<template>
  <div>
    <!-- 底部 -->
    <div class="footer">
      <div class="address">
          <!-- {{address}} -->
          <div class="text1">
             
             地址：太原市杏花岭区大东关红沟南街36号 <br>
              邮编：030013<br>
              电话：0351-2646018
          </div>
         
      </div>
      <div class="copyright">
        Copyright shanxi university all rights reserved 版权所有：山西大学自动化与软件学院
      </div>
      <div class="img">
        <img src="../assets/resoure/img/sxuer.jpg" alt="">
      </div>
    </div>
    <!-- /底部 -->
  </div>
</template>

<script>
import {get} from "../utils/request"
export default {
    data(){
        return {
            address:''
        }
    },
    created(){
        this.loadAddress()
    },
    methods:{
        //加载地址
        loadAddress(){
            let url = '/index/findByKey'
            get(url,{name:'address'}).then(res=>{
                let data = res.data
                //如果地址存在 返回 ，地址不存在不返回
                if(data){
                    this.address = data.val;
                    
                }
            })
            
        }
    }
}
</script>

<style lang="scss">
//底部样式开始
.footer {
    position: relative;
    padding-left: 200px;
  .address{
    height: 75px;
    width:480px;
    padding-top:40px;
     
  }
  background-color: #2261be;
  color: #fff;
  height: 180px;
  .img{
    width: 120px;
    height: 120px;
    position: absolute;
    right: 250px;
    top: 40px;
    img{
      width: 100%;
      height: 100%;
    }
  }
}
//底部样式结束
</style>